package com.zabra.zl.ui.buy.model;

import com.zabra.zl.data.DetailsDealBean;
import com.zabra.zl.data.SimpleBean;
import com.zabra.zl.data.StockBean;
import com.zabra.zl.net.RetrofitClient;
import com.zabra.zl.ui.buy.contract.BuyContract;

import io.reactivex.Flowable;
import okhttp3.RequestBody;
import retrofit2.Call;

public class BuyModel implements BuyContract.Model {
    @Override
    public Flowable<StockBean> getData(String sharesCode, int bpOrderId) {
        return RetrofitClient.getInstance().getApi().getStockData(sharesCode,bpOrderId);
    }

    @Override
    public Call<DetailsDealBean> getData(RequestBody body) {
        return RetrofitClient.getInstance().getApi().getDetailsDealData(body);
    }

    @Override
    public Call<SimpleBean> getData(String sharesCode, String sharesName, String entrustPrice, String entrustNum, String entrustProportion, String bpOrderId) {
        return RetrofitClient.getInstance().getApi().getBuyStockData(sharesCode, sharesName, entrustPrice, entrustNum, entrustProportion, bpOrderId);
    }
}
